package com.shzg.im.model;

import com.fasterxml.jackson.annotation.JsonProperty;

public class ApiResult {

    private static final int STATUS_OK = 1;
    private static final int STATUS_NOK = 0;

    private int status = 1;
    private String msg = "OK";
    private Object obj = "";
    public final static ApiResult RST_OK = new ApiResult();
    public final static ApiResult RST_NOK = new ApiResult(0, "NOK", "");

    public ApiResult() {
    }

    public ApiResult(int status, String msg, Object obj) {
        super();
        this.status = status;
        this.msg = msg;
        this.obj = obj;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @JsonProperty(value = "data")
    public Object getObj() {
        return obj;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }

}
